3.4.54 \(\int \frac {a+b x^2}{x^2 \sqrt {-1+c x} \sqrt {1+c x}} \, dx\) [354]

Optimal. Leaf size=33 \[ \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{x}+\frac {b \cosh ^{-1}(c x)}{c} \]

[Out]

b*arccosh(c*x)/c+a*(c*x-1)^(1/2)*(c*x+1)^(1/2)/x

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {465, 54} \begin {gather*} \frac {a \sqrt {c x-1} \sqrt {c x+1}}{x}+\frac {b \cosh ^{-1}(c x)}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2)/(x^2*Sqrt[-1 + c*x]*Sqrt[1 + c*x]),x]

[Out]

(a*Sqrt[-1 + c*x]*Sqrt[1 + c*x])/x + (b*ArcCosh[c*x])/c

Rule 54

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ArcCosh[b*(x/a)]/b, x] /; FreeQ[{a,
 b, c, d}, x] && EqQ[a + c, 0] && EqQ[b - d, 0] && GtQ[a, 0]

Rule 465

Int[((e_.)*(x_))^(m_.)*((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.)*(x_)^(non2_.))^(p_.)*((c_) + (d_.)
*(x_)^(n_)), x_Symbol] :> Simp[c*(e*x)^(m + 1)*(a1 + b1*x^(n/2))^(p + 1)*((a2 + b2*x^(n/2))^(p + 1)/(a1*a2*e*(
m + 1))), x] + Dist[(a1*a2*d*(m + 1) - b1*b2*c*(m + n*(p + 1) + 1))/(a1*a2*e^n*(m + 1)), Int[(e*x)^(m + n)*(a1
 + b1*x^(n/2))^p*(a2 + b2*x^(n/2))^p, x], x] /; FreeQ[{a1, b1, a2, b2, c, d, e, p}, x] && EqQ[non2, n/2] && Eq
Q[a2*b1 + a1*b2, 0] && (IntegerQ[n] || GtQ[e, 0]) && ((GtQ[n, 0] && LtQ[m, -1]) || (LtQ[n, 0] && GtQ[m + n, -1
])) &&  !ILtQ[p, -1]

Rubi steps

\begin {align*} \int \frac {a+b x^2}{x^2 \sqrt {-1+c x} \sqrt {1+c x}} \, dx &=\frac {a \sqrt {-1+c x} \sqrt {1+c x}}{x}+b \int \frac {1}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx\\ &=\frac {a \sqrt {-1+c x} \sqrt {1+c x}}{x}+\frac {b \cosh ^{-1}(c x)}{c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.09, size = 48, normalized size = 1.45 \begin {gather*} \frac {a \sqrt {-1+c x} \sqrt {1+c x}}{x}+\frac {2 b \tanh ^{-1}\left (\sqrt {\frac {-1+c x}{1+c x}}\right )}{c} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*x^2)/(x^2*Sqrt[-1 + c*x]*Sqrt[1 + c*x]),x]

[Out]

(a*Sqrt[-1 + c*x]*Sqrt[1 + c*x])/x + (2*b*ArcTanh[Sqrt[(-1 + c*x)/(1 + c*x)]])/c

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.29, size = 77, normalized size = 2.33

method result size
default \(\frac {\sqrt {c x -1}\, \sqrt {c x +1}\, \left (\sqrt {c^{2} x^{2}-1}\, \mathrm {csgn}\left (c \right ) c a +\ln \left (\left (\sqrt {c^{2} x^{2}-1}\, \mathrm {csgn}\left (c \right )+c x \right ) \mathrm {csgn}\left (c \right )\right ) b x \right ) \mathrm {csgn}\left (c \right )}{\sqrt {c^{2} x^{2}-1}\, c x}\) \(77\)
risch \(\frac {a \sqrt {c x -1}\, \sqrt {c x +1}}{x}+\frac {b \ln \left (\frac {c^{2} x}{\sqrt {c^{2}}}+\sqrt {c^{2} x^{2}-1}\right ) \sqrt {\left (c x +1\right ) \left (c x -1\right )}}{\sqrt {c^{2}}\, \sqrt {c x -1}\, \sqrt {c x +1}}\) \(78\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)/x^2/(c*x-1)^(1/2)/(c*x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

(c*x-1)^(1/2)*(c*x+1)^(1/2)*((c^2*x^2-1)^(1/2)*csgn(c)*c*a+ln(((c^2*x^2-1)^(1/2)*csgn(c)+c*x)*csgn(c))*b*x)*cs
gn(c)/(c^2*x^2-1)^(1/2)/c/x

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 44, normalized size = 1.33 \begin {gather*} \frac {b \log \left (2 \, c^{2} x + 2 \, \sqrt {c^{2} x^{2} - 1} c\right )}{c} + \frac {\sqrt {c^{2} x^{2} - 1} a}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/x^2/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="maxima")

[Out]

b*log(2*c^2*x + 2*sqrt(c^2*x^2 - 1)*c)/c + sqrt(c^2*x^2 - 1)*a/x

________________________________________________________________________________________

Fricas [A]
time = 3.32, size = 56, normalized size = 1.70 \begin {gather*} \frac {a c^{2} x + \sqrt {c x + 1} \sqrt {c x - 1} a c - b x \log \left (-c x + \sqrt {c x + 1} \sqrt {c x - 1}\right )}{c x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/x^2/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="fricas")

[Out]

(a*c^2*x + sqrt(c*x + 1)*sqrt(c*x - 1)*a*c - b*x*log(-c*x + sqrt(c*x + 1)*sqrt(c*x - 1)))/(c*x)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 38.91, size = 148, normalized size = 4.48 \begin {gather*} - \frac {a c {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {5}{4}, \frac {7}{4}, 1 & \frac {3}{2}, \frac {3}{2}, 2 \\1, \frac {5}{4}, \frac {3}{2}, \frac {7}{4}, 2 & 0 \end {matrix} \middle | {\frac {1}{c^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} - \frac {i a c {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2}, 1 & \\\frac {3}{4}, \frac {5}{4} & \frac {1}{2}, 1, 1, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{c^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} + \frac {b {G_{6, 6}^{6, 2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} & \frac {1}{2}, \frac {1}{2}, 1, 1 \\0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 0 & \end {matrix} \middle | {\frac {1}{c^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} c} - \frac {i b {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 1 & \\- \frac {1}{4}, \frac {1}{4} & - \frac {1}{2}, 0, 0, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{c^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)/x**2/(c*x-1)**(1/2)/(c*x+1)**(1/2),x)

[Out]

-a*c*meijerg(((5/4, 7/4, 1), (3/2, 3/2, 2)), ((1, 5/4, 3/2, 7/4, 2), (0,)), 1/(c**2*x**2))/(4*pi**(3/2)) - I*a
*c*meijerg(((1/2, 3/4, 1, 5/4, 3/2, 1), ()), ((3/4, 5/4), (1/2, 1, 1, 0)), exp_polar(2*I*pi)/(c**2*x**2))/(4*p
i**(3/2)) + b*meijerg(((1/4, 3/4), (1/2, 1/2, 1, 1)), ((0, 1/4, 1/2, 3/4, 1, 0), ()), 1/(c**2*x**2))/(4*pi**(3
/2)*c) - I*b*meijerg(((-1/2, -1/4, 0, 1/4, 1/2, 1), ()), ((-1/4, 1/4), (-1/2, 0, 0, 0)), exp_polar(2*I*pi)/(c*
*2*x**2))/(4*pi**(3/2)*c)

________________________________________________________________________________________

Giac [A]
time = 0.68, size = 58, normalized size = 1.76 \begin {gather*} \frac {\frac {16 \, a c^{2}}{{\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{4} + 4} - b \log \left ({\left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}^{4}\right )}{2 \, c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)/x^2/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="giac")

[Out]

1/2*(16*a*c^2/((sqrt(c*x + 1) - sqrt(c*x - 1))^4 + 4) - b*log((sqrt(c*x + 1) - sqrt(c*x - 1))^4))/c

________________________________________________________________________________________

Mupad [B]
time = 2.59, size = 61, normalized size = 1.85 \begin {gather*} \frac {a\,\sqrt {c\,x-1}\,\sqrt {c\,x+1}}{x}-\frac {4\,b\,\mathrm {atan}\left (\frac {c\,\left (\sqrt {c\,x-1}-\mathrm {i}\right )}{\left (\sqrt {c\,x+1}-1\right )\,\sqrt {-c^2}}\right )}{\sqrt {-c^2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^2)/(x^2*(c*x - 1)^(1/2)*(c*x + 1)^(1/2)),x)

[Out]

(a*(c*x - 1)^(1/2)*(c*x + 1)^(1/2))/x - (4*b*atan((c*((c*x - 1)^(1/2) - 1i))/(((c*x + 1)^(1/2) - 1)*(-c^2)^(1/
2))))/(-c^2)^(1/2)

________________________________________________________________________________________